package com.nioserver.io.task;

import com.nioserver.linklayer.Socket;
import com.proto.TMessage;

import java.io.IOException;
import java.nio.ByteBuffer;

public class WriteTask implements Runnable{
    Socket socket;
    public WriteTask(Socket socket) {
        this.socket = socket;

    }


    @Override
    public void run() {
        try {
            socket.write(socket.writeBuffer);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
